package com.jrx.anytxn.param.mapper.ext;

import com.jrx.anytxn.common.annotation.ParamTuningAnnotation;
import com.jrx.anytxn.param.entity.PrGuaranteeTable;
import com.jrx.anytxn.param.mapper.base.PrGuaranteeTableMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ExtPrGuaranteeTableMapper extends PrGuaranteeTableMapper {

    /**
     * 根据租户 代偿回购参数编号 查询
     * @param tenantId
     * @param guaranteeId
     * @return
     */
    PrGuaranteeTable selectByTenIdAndGuaranteeId(@Param("tenantId") String tenantId, @Param("guaranteeId") String guaranteeId);

    /**
     * 根据租户ID查询信息
     * @param tenantId
     * @return
     */
    List<PrGuaranteeTable> selectByTenId(@Param("tenantId") String tenantId ,@Param("status") String status);

    /**
     * 根据租户ID和延滞参数ID编辑信息
     * @param prGuaranteeTable
     * @return
     */
    @ParamTuningAnnotation
    int updateByTenIdAndGuaranteeId(PrGuaranteeTable prGuaranteeTable);

    /**
     * 根据租户ID和代偿回购参数ID删除信息
     * @param tenantId
     * @param guaranteeId
     * @return
     */
    @ParamTuningAnnotation
    int deleteByTenIdAndGuaranteeId(@Param("tenantId") String tenantId, @Param("guaranteeId") String guaranteeId);

    /**
     * 根据代偿回购ID查询信息
     * @param guaranteeId
     * @return
     */
    PrGuaranteeTable selectByGuaranteeId(@Param("guaranteeId") String guaranteeId);
}
